package net.qunzhi.modules.ysweixin.entity;

import lombok.Data;

@Data
public class AccessToken {

	private long expireTime;
	
	private String accessToken;

	public AccessToken(String accessToken,String expireIn) {
		super();
		this.accessToken = accessToken;
		expireTime = System.currentTimeMillis()+Integer.parseInt(expireIn)*1000; 
	}
	
	public boolean isExpired() {
		return System.currentTimeMillis()>expireTime;
	}
	
}
